package com.yuefresh.dish;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.yuefresh.core.Model;
import com.yuefresh.sys.Status;
import com.yuefresh.sys.User;


@Entity
@Table(name = "ds_meal")
public class Meal  extends Model {
	private static final long serialVersionUID = 1534214124234L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID")
	private Long id;
	@Column(name = "CODE")
	private String code;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STATUS_FK")
	private Status status;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AREA_FK")
	private Area area;
	@Column(name = "NUMBER")
	private Integer number;//用餐人数
	@Column(name = "DISCOUNT")
	private Double discount;
	@Column(name = "DISH_DISCOUNT")
	private Double dishDiscount;
	@Column(name = "DRINK_DISCOUNT")
	private Double drinkDiscount;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "WAITER_FK")
	private Waiter waiter;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CUSTOMER_FK")
	private User customer;
	@Column(name = "PLAN_TIME")
	private Date planTime;
	@Column(name = "ACTUAL_TIME")
	private Date actualTime;
	@Column(name = "MEMO")
	private String memo;
	@Column(name = "AMOUNT")
	private String amount;
	
	public Meal() {}
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}

	public Status getStatus() {
		return status;
	}
	public void setStatus(Status status) {
		this.status = status;
	}

	public Area getArea() {
		return area;
	}
	public void setArea(Area area) {
		this.area = area;
	}

	public Integer getNumber() {
		return number;
	}
	public void setNumber(Integer number) {
		this.number = number;
	}

	public Double getDiscount() {
		return discount;
	}
	public void setDiscount(Double discount) {
		this.discount = discount;
	}

	public Double getDishDiscount() {
		return dishDiscount;
	}
	public void setDishDiscount(Double dishDiscount) {
		this.dishDiscount = dishDiscount;
	}

	public Double getDrinkDiscount() {
		return drinkDiscount;
	}
	public void setDrinkDiscount(Double drinkDiscount) {
		this.drinkDiscount = drinkDiscount;
	}

	public Waiter getWaiter() {
		return waiter;
	}
	public void setWaiter(Waiter waiter) {
		this.waiter = waiter;
	}

	public User getCustomer() {
		return customer;
	}
	public void setCustomer(User customer) {
		this.customer = customer;
	}

	public Date getPlanTime() {
		return planTime;
	}
	public void setPlanTime(Date planTime) {
		this.planTime = planTime;
	}

	public Date getActualTime() {
		return actualTime;
	}
	public void setActualTime(Date actualTime) {
		this.actualTime = actualTime;
	}

	public String getMemo() {
		return memo;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getAmount() {
		return amount;
	}
	public void setAmount(String amount) {
		this.amount = amount;
	}
}
